package com.zjz.dao.user;

import com.zjz.pojo.Role;
import com.zjz.pojo.User;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface UserDao {
    //得到要登录的用户
    public User getLoginUser(Connection connection,String userCode) throws SQLException;

    //修改当前用户密码
    public int updatePsd(Connection connection,int id,String password) throws SQLException;

    // 根据用户名或者角色查询用户总数（最难的SQL）---采用StringBuffer存SQL（拼接）--list存数据
    public int getUserCount(Connection connection,String username,int userRole) throws SQLException;

    // 通过条件查询-userList
    public List<User> getUserList(Connection connection,String username,int userRole,int currentPageNo,int pageSize)throws Exception;





}
